home *** CD-ROM | disk | FTP | other *** search
/ PCMania 64 / PCMania CD64_1.iso / phy / phy001 / graph / graph20.arj / DEMOS / EXEMASM / MYDEMO.ASM next >
Encoding:
Assembly Source File  |  1996-08-30  |  1.8 KB  |  57 lines

  1. .MODEL SMALL
  2. .STACK
  3. .386
  4.  
  5. .DATA
  6. PVirt1  DB      0
  7. hFont   DB      0
  8. Msg1    DB      'Esto es una prueba de scroll',0
  9.  
  10. .CODE
  11. INCLUDE GRFLIB.INC
  12.  
  13. Inicio          PROC
  14.                 CALL    LiberaMEM       ;  Se libera la memoria.
  15.                 MOV     BX, 1
  16.                 MOV     EAX, 010b
  17.                 InicGRAPH               ;  Encendemos GRAPH.
  18.                 MOV     AX, @DATA
  19.                 MOV     DS, AX
  20.  
  21.                 CreaVirtual             ;  Pedimos una PV.
  22.                 MOV     [PVirt1], AL
  23.                 MOV     AL, 8
  24.                 CambiaTipo              ;  Cambiamos el tipo de fuente.
  25.                 CogeFuenteDOS           ;  Cogemos las fuentes del DOS.
  26.                 MOV     [hFont], AL
  27.  
  28.                 MOV     DX, 205
  29.           @@Bucle:
  30.                 PUSH    DX
  31.                 MOV     BX, 40
  32.                 SetCursor               ;  Colocamos el cursor.
  33.                 MOV     AL, [PVirt1]
  34.                 MOV     CL, 0
  35.                 BorraPantalla
  36.                 MOV     BH, DL
  37.                 MOV     SI, Offset Msg1
  38.                 MOV     BL, [PVirt1]
  39.                 MOV     AL, [hFont]
  40.                 MOV     CL, 9
  41.                 MOV     DL, 10
  42.                 Escribe                 ;  Escribimos
  43.                 WaitVR
  44.                 MOV     AL, [PVirt1]
  45.                 MOV     AH, 0           ;  La VGA
  46.                 CopiaPantalla           ;  Dibujamos en la VGA.
  47.                 POP     DX
  48.                 DEC     DX
  49.                 JNZ   @@Bucle           ;  Volvemos a repetir hasta 0.
  50.  
  51.                 VaciaMEM
  52.                 EndGRAPH
  53.                 MOV     AX, 4C00h
  54.                 INT     21h             ;  Salimos al DOS.
  55. Inicio          ENDP
  56.                 END     Inicio
  57.